package day11.random;

import java.util.Random;

/**
 * @Auther:小陈的Java
 */
public class RandomDemo {
    public static void main(String[] args) {
        //创建随机数对象
        Random random = new Random();
        //随机0-10之间的随机数包含0不包含10
        System.out.println(random.nextInt(10));
        //随机boolean类型
        System.out.println(random.nextBoolean());
        //随机0-1之间的小数包含0不包含1
        System.out.println(random.nextDouble());
    }
}
